package com.lineage.server.serverpackets;

import com.lineage.server.datatables.ExpTable;
import com.lineage.server.model.Instance.L1PcInstance;

public class S_Exp extends ServerBasePacket {
  private byte[] _byte;
  
  public S_Exp(L1PcInstance pc) {
    this._byte = null;
    writeC(113);
    writeC(pc.getLevel());
    writeEXP(pc.getExp());
  }
  
  public S_Exp() {
    this._byte = null;
    writeC(113);
    writeC(59);
    writeD(414931028);
    writeC(1);
  }
  
  public byte[] getContent() {
    if (this._byte == null)
      this._byte = getBytes(); 
    return this._byte;
  }
  
  public S_Exp(int level) {
    this._byte = null;
    writeC(113);
    writeC(level);
    writeExp(ExpTable.getExpByLevel(level));
  }
  
  public String getType() {
    return getClass().getSimpleName();
  }
}
